/**
 * DataSource.java
 * Jan 9, 2010
 */
package com.dlplay.flightinfo.source;

import java.util.Date;

/**
 * @author zhao yu
 *
 */
public abstract class DataSource {
	private Integer priority;
	private Integer interval;
	private Date lastUpdate = new Date();
	
	/*
	 * getPriority
	 */
	public int getPriority()
	{
		return priority;
	}
	
	/* (non-Javadoc)
	 * @see com.dlplay.flightinfo.core.datasource.DataSource#setPriority()
	 */
	public  void setPriority(Integer pri) {
		// TODO Auto-generated method stub
		priority = pri;
	}
	
	/*
	 * if Interval is 0
	 */
	public int getInterval()
	{
		return interval;
	}
	
	/* (non-Javadoc)
	 * @see com.dlplay.flightinfo.core.datasource.DataSource#setPriority()
	 */
	public  void setInterval(Integer interval) {
		// TODO Auto-generated method stub
		this.interval = interval;
	}

	/**
	 * @param lastUpdate the lastUpdate to set
	 */
	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	/**
	 * @return the lastUpdate
	 */
	public Date getLastUpdate() {
		return lastUpdate;
	}

	/**
	 * @param priority
	 * @param interval
	 */
//	public DataSource(int priority, int interval) {
//		super();
//		this.priority = priority;
//		this.interval = interval;
//	}
}
